<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/commons/include/html_doctype.html" %>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<%@include file="/commons/page/codegen.jsp" %>
		<script type="text/javascript" src="${ctx}/js/gpoint/rdp/zoneCTL/doorController.js"></script>
		<style>
		    .doorinfo{
		        margin-top: 150px;
			    width: 95%;
			    text-align: left;
			    margin-left: 55px;		    
		    }
		    
		     
		    .dwh {
			    border: 1px solid #80808052;
			    text-align: center;
			    background-color: #80808024;
			}
			
			.ic {
			    display: inline-block;
			    width: 60px;
			    height: 25px;
			    vertical-align: middle;
			    margin-top: 5px;
			}
			.mycheckbox{
			    width: 25px;
			} 
		</style>
	</head>
	<body>
   
   <div class="wrapper wrapper-content  animated fadeInRight col-sm-12">
			<div class="">
				<form  class="fr-form" method="post" enctype='application/json' id="doorControllerForm">
					<input type="hidden"  value="${doorController.controllerid}"/>
					
						<div class="fr_response_field col-sm-3" >
						 	<div class="fr-form-group"> 
							 	<label class="fr-control-label">产品序列号</label>
							  	<div class="fr-form-block">
						             <p class="form-control-static">${doorController.controllersn}</p>
							 	</div>
						  	</div>
						</div>
						
						<div class="fr_response_field col-sm-3" >
						 	<div class="fr-form-group"> 
							 	<label class="fr-control-label">控制器名称</label>
							  	<div class="fr-form-block">
						             <p class="form-control-static">${doorController.controllerno}</p>
							 	</div>
						  	</div>
						</div>
						
						<div class="fr_response_field col-sm-3" >
						 	<div class="fr-form-group"> 
							 	<label class="fr-control-label">IP地址</label>
							  	<div class="fr-form-block">
						             <p class="form-control-static">${doorController.ipa}</p>
							 	</div>
						  	</div>
						</div>
						
						<div class="fr_response_field col-sm-3" >
						 	<div class="fr-form-group"> 
							 	<label class="fr-control-label">端口号</label>
							  	<div class="fr-form-block">
						             <p class="form-control-static">${doorController.port}</p>
							 	</div>
						  	</div>
						</div>
						
						<div class="fr_response_field col-sm-3" >
						 	<div class="fr-form-group"> 
							 	<label class="fr-control-label">子网掩码</label>
							  	<div class="fr-form-block">
						             <p class="form-control-static">${doorController.submask}</p>
							 	</div>
						  	</div>
						</div>
						
						<div class="fr_response_field col-sm-3" >
						 	<div class="fr-form-group"> 
							 	<label class="fr-control-label">网关</label>
							  	<div class="fr-form-block">
						             <p class="form-control-static">${doorController.gateway}</p>
							 	</div>
						  	</div>
						</div>
						
						<div class="fr_response_field col-sm-3" >
						 	<div class="fr-form-group"> 
							 	<label class="fr-control-label">所在区域</label>
							  	<div class="fr-form-block">
						             <p class="form-control-static">${doorController.zonename}</p>
							 	</div>
						  	</div>
						</div>
						
						<div class="fr_response_field col-sm-3" >
						 	<div class="fr-form-group"> 
							 	<label class="fr-control-label">备注</label>
							  	<div class="fr-form-block">
						             <p class="form-control-static">${doorController.note}</p>
							 	</div>
						  	</div>
						</div>
						
						 <div class="fr_response_field col-sm-2" >
							 	<div class="fr-form-group"> 
								 	<label class="fr-control-label">启用</label>
								  	<div class="fr-form-block" data-type="fixed">								         
								         <c:if test="${doorController.enabled == '1'}">  
								     			<input  type="checkbox" id="cbCheckbox1"  class="fr-form-control" value="1" checked="checked" style = "width:20px;"/>					  										 	
								         </c:if>
								         <c:if test="${doorController.enabled != '1'}">  
								     			<input  type="checkbox" id="cbCheckbox1"  class="fr-form-control"  value="1" style = "width:20px;" />		
								         </c:if>		  					
								 	</div>
							  	</div>
						</div>							                        
				</form>









			</div>
		</div>
 
		
		
	 			
		<!-- <div id = "doorInfo" class="panel panel-default doorinfo" style="display:none"> -->
		<!-- 	<div class="panel panel-default">
			  <div class="panel-heading">门信息</div>
			  <div class="panel-body"> -->
			  
			  

			  
			  
			            
					      <div style="display:none" id="menu_item1">
                               <c:if test="${doorController.controllersn.substring(0,1)=='1' }"> 
							        <div class="fr_response_field col-sm-3"  >
									 	<div class="fr-form-group"> 
										 	<label class="fr-control-label">1号门</label>
										  	<div class="fr-form-block" data-type="fixed">
										  	    <input id ="doorsid11"  type="hidden" value="${doorController.doors.size()==1?doorController.doors.get(0).doorid:''}"/>
										        <input type="text"  title="1号门" class="fr-form-control door" id="doorsnames11" name="m:doorController:doorsnames"  validate="{required:false}"/>				
										 	</div>
									  	</div>
									</div>	
									<div class="fr_response_field col-sm-3"  >
									 	<div class="fr-form-group"> 
										 	<label class="fr-control-label">控制方式</label>
										  	<div class="fr-form-block dwh" data-type="fixed" >			
										        <%--  <div class="ic"><input type="radio"  name="ctrl11" value="3" ${doorController.doors.size()==1 and doorController.doors.get(0).doorcontrol eq '3' or doorController.doors.size()==0? 'checked=true':''}>在线</div>  --%> 
												  <div class="ic"><input type="radio"  name="ctrl11" value="3"   }>在线</div> 
												<div class="ic"><input type="radio"  name="ctrl11" value="1" ${doorController.doors.size()==1 and doorController.doors.get(0).doorcontrol eq '1'? 'checked=true':''}>常开</div> 
												<div class="ic"><input type="radio"  name="ctrl11" value="2" ${doorController.doors.size()==1 and doorController.doors.get(0).doorcontrol eq '2'? 'checked=true':''}>常闭</div>								        			  					
										 	</div>
									  	</div>
									</div>
									
									<div class="fr_response_field col-sm-2"  >
									 	<div class="fr-form-group"> 
										 	<label class="fr-control-label">开门延时(s)</label>
										  	<div class="fr-form-block" data-type="fixed">
										        <input type="number"  class="fr-form-control" id="delay11" value="${doorController.doors.size()==1 ? doorController.doors.get(0).doordelay:3}"/>				  					
										 	</div>
									  	</div>
									</div>
																		
								  <%--   <div class="fr_response_field col-sm-2"  >
									 	<div class="fr-form-group"> 
										 	<label class="fr-control-label">进门</label>
										  	<div class="fr-form-block" data-type="fixed">
										       <input type="checkbox" class="fr-form-control mycheckbox" id="doors111" name="m:doorController:doorsnames" value="1"  ${doorController.doors.size()==1 and doorController.doors.get(0).doorenabled.substring(0,1) eq '1'? 'checked=true':''} validate="{required:false}"/>					  					
										 	</div>
									  	</div>
									</div>	 
									
									<div class="fr_response_field col-sm-2"  >
									 	<div class="fr-form-group"> 
										 	<label class="fr-control-label">出门</label>
										  	<div class="fr-form-block" data-type="fixed">
										        <input type="checkbox" class="fr-form-control mycheckbox" id="doors112" name="m:doorController:doorsnames" value="1" ${doorController.doors.size()==1 and doorController.doors.get(0).doorenabled.substring(1,2) eq '1'? 'checked=true':''} validate="{required:false}"/>				  					
										 	</div>
									  	</div>
									</div>	 	 --%>		   
							 	</c:if>
						 </div>
						
		<!-- 	  </div>
		</div>	 -->
			  	
			  	
			  		<div style="display:none" id="menu_item2" name="form" method="post" action=""> 
						    <c:if test="${doorController.controllersn.substring(0,1)=='2' }"> 
								<div class="fr_response_field col-sm-4"  >
								 	<div class="fr-form-group"> 
									 	<label class="fr-control-label">1号门</label>
									  	<div class="fr-form-block" data-type="fixed">
									  	    <input id ="doorsid21"  type="hidden" value="${doorController.doors.size()==2?doorController.doors.get(0).doorid:''}"/>
									        <input type="text" title="1号门" class="fr-form-control door" id="doorsnames21" name="m:doorController:doorsnames" value="${doorController.doors.size()==2?doorController.doors.get(0).doorname:''}" validate="{required:false}"/>				  					
									 	</div>
								  	</div>
								</div>	
								<div class="fr_response_field col-sm-4"  >
								 	<div class="fr-form-group"> 
									 	<label class="fr-control-label">控制方式</label>
									  	<div class="fr-form-block dwh" data-type="fixed" >			
									        <div class="ic"><input type="radio"  name="ctrl21" value="3" ${doorController.doors.size()==2 and doorController.doors.get(0).doorcontrol eq '3' or  doorController.doors.size()==0? 'checked=true':''}>在线</div> 
											<div class="ic"><input type="radio"  name="ctrl21" value="1" ${doorController.doors.size()==2 and doorController.doors.get(0).doorcontrol eq '1'? 'checked=true':''}>常开</div> 
											<div class="ic"><input type="radio"  name="ctrl21" value="2" ${doorController.doors.size()==2 and doorController.doors.get(0).doorcontrol eq '2'? 'checked=true':''}>常闭</div>								        			  					
									 	</div>
								  	</div>
								</div>
								
								<div class="fr_response_field col-sm-4"  >
								 	<div class="fr-form-group"> 
									 	<label class="fr-control-label">开门延时(s)</label>
									  	<div class="fr-form-block" data-type="fixed">
									        <input type="number"  class="fr-form-control" id="delay21" value="${doorController.doors.size()==2?doorController.doors.get(0).doordelay:3}"/>				  					
									 	</div>
								  	</div>
								</div>
																 
							<%-- 	<div class="fr_response_field col-sm-2"  >
									 	<div class="fr-form-group"> 
										 	<label class="fr-control-label">进门</label>
										  	<div class="fr-form-block" data-type="fixed">
										        <input type="checkbox" class="fr-form-control mycheckbox" id="doors211" name="m:doorController:doorsnames" value="1" ${doorController.doors.size()==2 and doorController.doors.get(0).doorenabled.substring(0,1) eq '1'? 'checked=true':''} validate="{required:false}"/>				  					
										 	</div>
									  	</div>
								</div>	 
								<div class="fr_response_field col-sm-2"  >
								 	<div class="fr-form-group"> 
									 	<label class="fr-control-label">出门</label>
									  	<div class="fr-form-block" data-type="fixed">
									        <input type="checkbox" class="fr-form-control mycheckbox" id="doors212" name="m:doorController:doorsnames" value="1" ${doorController.doors.size()==2 and doorController.doors.get(0).doorenabled.substring(1,2) eq '1'? 'checked=true':''} validate="{required:false}"/>				
									 	</div>
								  	</div>
								</div>	  --%>
								
								
								<%-- <div class="fr_response_field col-sm-2">
								<div class="fr-form-group">
									<label class="fr-control-label">所在区域</label>
									<div class="fr-form-block" data-type="fixed">
									    <input name="m:doorController:zoneid21" type="hidden"   id="zoneid21" value="${doorController.zoneid}"/>						    					
									    <input type="text" data-key="#zoneid21" readonly="readonly"  class="form-control comboTree" data-toggle="dictionary" data-url="${ctx}/rdp/area/zone/list_json_tree.htm?" value="${doorController.zonename}"  validate="{required:true}"/>
									</div>
								</div>
							</div>	 --%>
							
							   <br></br>
							
							
								<div class="fr_response_field col-sm-4"  >
								 	<div class="fr-form-group"> 
									 	<label class="fr-control-label">2号门</label>
									  	<div class="fr-form-block" data-type="fixed">
									  	   <input id ="doorsid22"  type="hidden" value="${doorController.doors.size()==2?doorController.doors.get(1).doorid:''}"/>
									        <input type="text" title="2号门" class="fr-form-control door" id="doorsnames22" name="m:doorController:doorsnames" value="${doorController.doors.size()==2 ? doorController.doors.get(1).doorname:''}" validate="{required:false}"/>				  					
									 	</div>
								  	</div>
								</div>	
								
												
							
							
							
								<div class="fr_response_field col-sm-4"  >
								 	<div class="fr-form-group"> 
									 	<label class="fr-control-label">控制方式</label>
									  	<div class="fr-form-block dwh" data-type="fixed" >			
									        <div class="ic"><input type="radio"  name="ctrl22" value="3" ${doorController.doors.size()==2 and doorController.doors.get(1).doorcontrol eq '3' or doorController.doors.size()==0? 'checked=true':''}>在线</div> 
											<div class="ic"><input type="radio"  name="ctrl22" value="1" ${doorController.doors.size()==2 and doorController.doors.get(1).doorcontrol eq '1'? 'checked=true':''}>常开</div> 
											<div class="ic"><input type="radio"  name="ctrl22" value="2" ${doorController.doors.size()==2 and doorController.doors.get(1).doorcontrol eq '2'? 'checked=true':''}>常闭</div>								        			  					
									 	</div>
								  	</div>
								</div>
								
								<div class="fr_response_field col-sm-4"  >
								 	<div class="fr-form-group"> 
									 	<label class="fr-control-label">开门延时(s)</label>
									  	<div class="fr-form-block" data-type="fixed">
									        <input type="number"  class="fr-form-control" id="delay22" value="${doorController.doors.size()==2?doorController.doors.get(1).doordelay:3}"/>				  					
									 	</div>
								  	</div>
								</div> 
							<%-- 	<div class="fr_response_field col-sm-2"  >
									 	<div class="fr-form-group"> 
										 	<label class="fr-control-label">进门</label>
										  	<div class="fr-form-block" data-type="fixed">
										        <input type="checkbox" class="fr-form-control mycheckbox" id="doors221" name="m:doorController:doorsnames" value="1" ${doorController.doors.size()==2 and doorController.doors.get(1).doorenabled.substring(0,1) eq '1'? 'checked=true':''} />				  					
										 	</div>
									  	</div>
								</div>	 
								<div class="fr_response_field col-sm-2"  >
								 	<div class="fr-form-group"> 
									 	<label class="fr-control-label">出门</label>
									  	<div class="fr-form-block" data-type="fixed">
									        <input type="checkbox" class="fr-form-control mycheckbox" id="doors222" name="m:doorController:doorsnames" value="1" ${doorController.doors.size()==2 and doorController.doors.get(1).doorenabled.substring(1,2) eq '1'? 'checked=true':''}"/>				
									 	</div>
								  	</div>
								</div>	  --%>
								
											
							<%-- <div class="fr_response_field col-sm-2">
								<div class="fr-form-group">
									<label class="fr-control-label">所在区域</label>
									<div class="fr-form-block" data-type="fixed">
									    <input name="m:doorController:zoneid22" type="hidden"   id="zoneid22" value="${doorController.zoneid}"/>						    					
									    <input type="text" data-key="#zoneid22" readonly="readonly"  class="form-control comboTree" data-toggle="dictionary" data-url="${ctx}/rdp/area/zone/list_json_tree.htm?" value="${doorController.zonename}"  validate="{required:true}"/>
									</div>
								</div>
							</div>	
							 --%>
																					
							</c:if>																									
						</div>
						
						<!--end   -->
						
							 <div style="display:none" id="menu_item3" name="form" method="post" action="">
							 <c:if test="${doorController.controllersn.substring(0,1)=='4'}"> 
								 <div class="fr_response_field col-sm-3"  >
									 	<div class="fr-form-group"> 
										 	<label class="fr-control-label">1号门</label>
										  	<div class="fr-form-block" data-type="fixed">
										  	   <input id ="doorsid41"  type="hidden" value="${doorController.doors.size()==4?doorController.doors.get(0).doorid:''}"/>
										        <input type="text" title="1号门" class="fr-form-control door" id="doorsnames41" name="m:doorController:doorsnames" value="${doorController.doors.size()==4? doorController.doors.get(0).doorname:''}" validate="{required:false}"/>				  					
										 	</div>
									  	</div>
									</div>
									<div class="fr_response_field col-sm-3"  >
									 	<div class="fr-form-group"> 
										 	<label class="fr-control-label">控制方式</label>
										  	<div class="fr-form-block dwh" data-type="fixed" >			
										        <div class="ic"><input type="radio"  name="ctrl41" value="3" ${doorController.doors.size()==4 and doorController.doors.get(0).doorcontrol eq '3' or doorController.doors.size()==0? 'checked=true':''}>在线</div> 
												<div class="ic"><input type="radio"  name="ctrl41" value="1" ${doorController.doors.size()==4 and doorController.doors.get(0).doorcontrol eq '1'? 'checked=true':''}>常开</div> 
												<div class="ic"><input type="radio"  name="ctrl41" value="2" ${doorController.doors.size()==4 and doorController.doors.get(0).doorcontrol eq '2'? 'checked=true':''}>常闭</div>								        			  					
										 	</div>
									  	</div>
									</div>
									
									<div class="fr_response_field col-sm-2"  >
									 	<div class="fr-form-group"> 
										 	<label class="fr-control-label">开门延时(s)</label>
										  	<div class="fr-form-block" data-type="fixed">
										        <input type="number"  class="fr-form-control" id="delay41" value="${doorController.doors.size()==4?doorController.doors.get(0).doordelay:3}"/>				  					
										 	</div>
									  	</div>
									</div> 	 
									<div class="fr_response_field col-sm-2"  >
										 	<div class="fr-form-group"> 
											 	<label class="fr-control-label">进门</label>
											  	<div class="fr-form-block" data-type="fixed">
											        <input type="checkbox" class="fr-form-control mycheckbox" id="doors411" name="m:doorController:doorsnames" value="1" ${doorController.doors.size()==4 and doorController.doors.get(0).doorenabled.substring(0,1) eq '1'? 'checked=true':''}/>				  					
											 	</div>
										  	</div>
									</div>
									
											
						<%-- 	<div class="fr_response_field col-sm-2">
								<div class="fr-form-group">
									<label class="fr-control-label">所在区域</label>
									<div class="fr-form-block" data-type="fixed">
									    <input name="m:doorController:zoneid41" type="hidden"   id="zoneid41" value="${doorController.zoneid}"/>						    					
									    <input type="text" data-key="#zoneid41" readonly="readonly"  class="form-control comboTree" data-toggle="dictionary" data-url="${ctx}/rdp/area/zone/list_json_tree.htm?" value="${doorController.zonename}"  validate="{required:true}"/>
									</div>
								</div>
							</div>	 --%>
							
							
									<div class="fr_response_field col-sm-3"  >
									 	<div class="fr-form-group"> 
										 	<label class="fr-control-label">2号门</label>
										  	<div class="fr-form-block" data-type="fixed">
										  	    <input id ="doorsid42"  type="hidden" value="${doorController.doors.size()==4?doorController.doors.get(1).doorid:''}"/>
										        <input type="text" title="2号门" class="fr-form-control door" id="doorsnames42" name="m:doorController:doorsnames" value="${doorController.doors.size()==4? doorController.doors.get(1).doorname:''}" validate="{required:false}"/>				  					
										 	</div>
									  	</div>
									</div>
									<div class="fr_response_field col-sm-3"  >
									 	<div class="fr-form-group"> 
										 	<label class="fr-control-label">控制方式</label>
										  	<div class="fr-form-block dwh" data-type="fixed" >			
										        <div class="ic"><input type="radio"  name="ctrl42" value="3" ${doorController.doors.size()==4 and doorController.doors.get(1).doorcontrol eq '3' or doorController.doors.size()==0? 'checked=true':''} >在线</div> 
												<div class="ic"><input type="radio"  name="ctrl42" value="1" ${doorController.doors.size()==4 and doorController.doors.get(1).doorcontrol eq '1'? 'checked=true':''}>常开</div> 
												<div class="ic"><input type="radio"  name="ctrl42" value="2" ${doorController.doors.size()==4 and doorController.doors.get(1).doorcontrol eq '2'? 'checked=true':''}>常闭</div>								        			  					
										 	</div>
									  	</div>
									</div>
									
									<div class="fr_response_field col-sm-2"  >
									 	<div class="fr-form-group"> 
										 	<label class="fr-control-label">开门延时(s)</label>
										  	<div class="fr-form-block" data-type="fixed">
										        <input type="number"  class="fr-form-control" id="delay42" value="${doorController.doors.size()==4?doorController.doors.get(1).doordelay:3}"/>				  					
										 	</div>
									  	</div>
									</div> 	 
									<div class="fr_response_field col-sm-2"  >
										 	<div class="fr-form-group"> 
											 	<label class="fr-control-label">进门</label>
											  	<div class="fr-form-block" data-type="fixed">
											        <input type="checkbox" class="fr-form-control mycheckbox" id="doors421" name="m:doorController:doorsnames" value="1" ${doorController.doors.size()==4 and doorController.doors.get(1).doorenabled.substring(0,1) eq '1'? 'checked=true':''} />				  					
											 	</div>
										  	</div>
									</div>	
									
									
											
						<%-- 	<div class="fr_response_field col-sm-2">
								<div class="fr-form-group">
									<label class="fr-control-label">所在区域</label>
									<div class="fr-form-block" data-type="fixed">
									    <input name="m:doorController:zoneid42" type="hidden"   id="zoneid42" value="${doorController.zoneid}"/>						    					
									    <input type="text" data-key="#zoneid42" readonly="readonly"  class="form-control comboTree" data-toggle="dictionary" data-url="${ctx}/rdp/area/zone/list_json_tree.htm?" value="${doorController.zonename}"  validate="{required:true}"/>
									</div>
								</div>
							</div>	 --%>
							
							
									<div class="fr_response_field col-sm-3"  >
									 	<div class="fr-form-group"> 
										 	<label class="fr-control-label">3号门</label>
										  	<div class="fr-form-block" data-type="fixed">
										  	    <input id ="doorsid43"  type="hidden" value="${doorController.doors.size()==4?doorController.doors.get(2).doorid:''}"/>
										        <input type="text" title="3号门" class="fr-form-control door" id="doorsnames43" name="m:doorController:doorsnames" value="${doorController.doors.size()==4 ?doorController.doors.get(2).doorname:''}" validate="{required:false}"/>				  					
										 	</div>
									  	</div>
									</div>	
									<div class="fr_response_field col-sm-3"  >
									 	<div class="fr-form-group"> 
										 	<label class="fr-control-label">控制方式</label>
										  	<div class="fr-form-block dwh" data-type="fixed" >			
										        <div class="ic"><input type="radio"  name="ctrl43" value="3" ${doorController.doors.size()==4 and doorController.doors.get(2).doorcontrol eq '3' or doorController.doors.size()==0? 'checked=true':''}>在线</div> 
												<div class="ic"><input type="radio"  name="ctrl43" value="1" ${doorController.doors.size()==4 and doorController.doors.get(2).doorcontrol eq '1'? 'checked=true':''}>常开</div> 
												<div class="ic"><input type="radio"  name="ctrl43" value="2" ${doorController.doors.size()==4 and doorController.doors.get(2).doorcontrol eq '2'? 'checked=true':''}>常闭</div>								        			  					
										 	</div>
									  	</div>
									</div>
									
									<div class="fr_response_field col-sm-2"  >
									 	<div class="fr-form-group"> 
										 	<label class="fr-control-label">开门延时(s)</label>
										  	<div class="fr-form-block" data-type="fixed">
										        <input type="number"  class="fr-form-control" id="delay43" value="${doorController.doors.size()==4?doorController.doors.get(2).doordelay:3}"/>				  					
										 	</div>
									  	</div>
									</div>  
									<div class="fr_response_field col-sm-2"  >
										 	<div class="fr-form-group"> 
											 	<label class="fr-control-label">进门</label>
											  	<div class="fr-form-block" data-type="fixed">
											        <input type="checkbox" class="fr-form-control mycheckbox" id="doors431" name="m:doorController:doorsnames" value="1" ${doorController.doors.size()==4 and doorController.doors.get(2).doorenabled.substring(0,1) eq '1'? 'checked=true':''} />				  					
											 	</div>
										  	</div>
									</div>	
									
											
						<%-- 	<div class="fr_response_field col-sm-2">
								<div class="fr-form-group">
									<label class="fr-control-label">所在区域</label>
									<div class="fr-form-block" data-type="fixed">
									    <input name="m:doorController:zoneid43" type="hidden"   id="zoneid43" value="${doorController.zoneid}"/>						    					
									    <input type="text" data-key="#zoneid43" readonly="readonly"  class="form-control comboTree" data-toggle="dictionary" data-url="${ctx}/rdp/area/zone/list_json_tree.htm?" value="${doorController.zonename}"  validate="{required:true}"/>
									</div>
								</div>
							</div>	
							 --%>
									<div class="fr_response_field col-sm-3"  >
									 	<div class="fr-form-group"> 
										 	<label class="fr-control-label">4号门</label>
										  	<div class="fr-form-block" data-type="fixed">
										  	    <input id ="doorsid44"  type="hidden" value="${doorController.doors.size()==4?doorController.doors.get(3).doorid:''}"/>
										        <input type="text" title="4号门" class="fr-form-control door" id="doorsnames44" name="m:doorController:doorsnames" value="${doorController.doors.size()==4?doorController.doors.get(3).doorname:''}" validate="{required:false}"/>				  					
										 	</div>
									  	</div>
									</div>	
									<div class="fr_response_field col-sm-3"  >
									 	<div class="fr-form-group"> 
										 	<label class="fr-control-label">控制方式</label>
										  	<div class="fr-form-block dwh" data-type="fixed" >			
										        <div class="ic"><input type="radio"  name="ctrl44" value="3" ${doorController.doors.size()==4 and doorController.doors.get(3).doorcontrol eq '3' or doorController.doors.size()==0? 'checked=true':''}>在线</div> 
												<div class="ic"><input type="radio"  name="ctrl44" value="1" ${doorController.doors.size()==4 and doorController.doors.get(3).doorcontrol eq '1'? 'checked=true':''}>常开</div> 
												<div class="ic"><input type="radio"  name="ctrl44" value="2" ${doorController.doors.size()==4 and doorController.doors.get(3).doorcontrol eq '2'? 'checked=true':''}>常闭</div>								        			  					
										 	</div>
									  	</div>
									</div>
									
									<div class="fr_response_field col-sm-2"  >
									 	<div class="fr-form-group"> 
										 	<label class="fr-control-label">开门延时(s)</label>
										  	<div class="fr-form-block" data-type="fixed">
										        <input type="number"  class="fr-form-control" id="delay44" value="${doorController.doors.size()==4?doorController.doors.get(3).doordelay:3}"/>				  					
										 	</div>
									  	</div>
									</div>  
									<div class="fr_response_field col-sm-2"  >
										 	<div class="fr-form-group"> 
											 	<label class="fr-control-label">进门</label>
											  	<div class="fr-form-block" data-type="fixed">
											        <input type="checkbox" class="fr-form-control mycheckbox" id="doors441" name="m:doorController:doorsnames" value="1" ${doorController.doors.size()==4 and doorController.doors.get(3).doorenabled.substring(0,1) eq '1'? 'checked=true':''}/>				  					
											 	</div>
										  	</div>
									</div>	   
							 
							 			
					<%-- 		<div class="fr_response_field col-sm-2">
								<div class="fr-form-group">
									<label class="fr-control-label">所在区域</label>
									<div class="fr-form-block" data-type="fixed">
									    <input name="m:doorController:zoneid44" type="hidden"   id="zoneid44" value="${doorController.zoneid}"/>						    					
									    <input type="text" data-key="#zoneid44" readonly="readonly"  class="form-control comboTree" data-toggle="dictionary" data-url="${ctx}/rdp/area/zone/list_json_tree.htm?" value="${doorController.zonename}"  validate="{required:true}"/>
									</div>
								</div>
							</div>	 --%>
							
							 </c:if>
				
						</div>
						
						
						<!-- end -->
	<script type="text/javascript" >
			$(function(){
				var num = '${doorController.controllersn}';
				upperCase(num);
				checkParam();
				
			});
					 
			 function upperCase(x)
			 {
				 
				 // var sn = $("#ctlno").val();
				  sn='${doorController.controllersn}'; 
				//  alert("sn="+sn);
				 if (sn.startsWith("1")) {					 
					$("#doorInfo").show();
					$("#menu_item1").show();
					$("#menu_item2").hide();
					$("#menu_item3").hide();					
				 }
				 else if (sn.startsWith("2")) {
					 $("#doorInfo").show();
					 $("#menu_item1").hide();
					 $("#menu_item2").show();
					 $("#menu_item3").hide();										 
				 }
				 else if (sn.startsWith("4")) {
					 $("#doorInfo").show();
					 $("#menu_item1").hide();
					 $("#menu_item2").hide();
					 $("#menu_item3").show(); 
				 }	
				 else{
					 $("#doorInfo").hide();
				 }			 
			 }
			 		
			
			 
			 //查看控制器门控制方式
			 var contactChar="&";
			 var sn = '${doorController.controllersn}';
			 
			 function checkParam(){
				// var url="http://192.168.0.186:8025/getDoorMessage?";		
				
				address='${address}';
				 var url= address+"/getDoorMessage?";	 
				// alert("url="+url);
				var snValid = sn.substring(0,1); //截取前面的门数
				 var snInt = parseInt(snValid);
				 var doors=[];
				 var paramSn = "sn="+sn;
                
				 
                 
                 //1号门，只会获取1号门的信息
				 //获取门信息
				 // alert("snInt="+snInt);
				  var index = 0;
                 for( var i=1;i<=snInt;i++){
                	 index = i;
                	 var doorParam = "door="+i; //门数
                	 var singleUrl = url+paramSn+contactChar+doorParam;
                	 $.ajax({
     					url : singleUrl,
     					type : "get",
     					contentType : "application/json",
     					//data:JSON.stringify(map),
     					dataType : "json",
     					async : false,
     					success : function(data) {
     						console.log(data);
     						
     						if(data.code==200){
     							//alert("获取单号门成功");
     						
         						//doors.push(data);
         						if(index==1){//赋值操作：
         							//alert("单号门赋值");
         						      if(sn.startsWith("1")){
         						    	 //alert(data.door);
                   						$("#doorsnames11").val(data.door);
                   						//alert("aa="+data.controllerNO );
                   						//alert(typeof(data.controllerNO ));
                   						
                   						$("[name='ctrl11'][value='"+ data.controllerNO +"']").prop("checked", "checked");
                   						
                   					//	$("[name='ctrl11'][value='3']").prop("checked", "checked");
                   						$("#delay11").val(data.openDelayTime);
               							/* $("#doors111").val(data.controllerNO);  暂时后台没有这些信息
               							$("#doors112").val(data.controllerNO); */
         						      } 
         						   
         							
         							if(sn.startsWith("2")){
         								//第一列
             							$("#doorsnames21").val(data.door);
             							$("[name='ctrl21'][value='"+ data.controllerNO +"']").prop("checked", "checked");
             							$("#delay21").val(data.openDelayTime);
             						//	$("#delay211").val();
             						//	$("#doors212").val();
         							}
         							
         							if(sn.startsWith("4")){
         								//第一列
             							$("#doorsnames41").val(data.door);
             							$("[name='ctrl41'][value='"+ data.controllerNO +"']").prop("checked", "checked");
             							$("#delay41").val();
             							$("#delay411").val();
         							}
         						}
         						
         						if(index==2){//双门
         							if(sn.startsWith("2")){
         								//第二列
             							$("#doorsnames22").val(data.door);
             							$("[name='ctrl22'][value='"+ data.controllerNO +"']").prop("checked", "checked");
             							$("#delay22").val(data.openDelayTime);
             							//$("#delay221").val();
             							//$("#doors222").val(); 
         							}
         						
         							if(sn.startsWith("4")){
         								//第2列
             							$("#doorsnames42").val(data.door);
             							$("[name='ctrl42'][value='"+ data.controllerNO +"']").prop("checked", "checked");
             							$("#delay42").val();
             							$("#delay421").val();
         							}
         							
         						}
         						
         						 if(index==3){
         							//第3列
          							$("#doorsnames43").val(data.door);
          							$("[name='ctrl43'][value='"+ data.controllerNO +"']").prop("checked", "checked");
          							$("#delay43").val();
          							$("#delay431").val();
         						 }
         						
         						if(index==4){ //4号门  单门
         							 //第4列
         							$("#doorsnames44").val(data.door);
         							$("[name='ctrl44'][value='"+ data.controllerNO +"']").prop("checked", "checked");
         							$("#delay44").val();
         							$("#delay441").val();
         							
         							
         						}
         						
         						
         						
         						
     						}   						
     					},
     					error:function(xhr,textStatus){
     						 alert("获取门信息失败");
     						 //隐藏m1,m2,m3
     						 $("#doorInfo").hide();
     						 $("#menu_item1").hide();
     						 $("#menu_item2").hide();
     						 $("#menu_item3").hide();	
     					}
     			   
     				});	 
                	 
                 }
				 			 
			 }
			 
			
			 
			 
			
			 
			 			
		</script>
		

							
							
			
	</body>
</html>